<template>
  <div class="doctor-card" @click="onClick">
    <img :src="item.cozImg" class="ins-1" />
    <div class="ins-2">{{ item.cozName }}</div>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router'
const props = defineProps<{
  item: any
}>()
const router = useRouter()
const onClick = () => {
  if (props.item.isFrame == '1') {
    window.location.href = props.item.cozUrl
  } else {
    router.push({
      path: '/VideoDisplay',
      query: {
        id: props.item.cozId
      }
    })
  }
}
</script>

<style lang="scss" scoped>
.doctor-card {
  width: 149px;
  height: 147px;
  box-sizing: border-box;
}
.ins-1 {
  width: 130px;
  height: 88px;
}
.ins-2 {
  width: 149px;
  height: 60px;
  padding: 10px;
  font-weight: 400;
  font-size: 13px;
  color: #777777;
  box-sizing: border-box;
  white-space: nowrap; /* 防止文本换行 */
  overflow: hidden; /* 溢出隐藏 */
  text-overflow: ellipsis; /* 使用省略号显示截断的文本 */
}
</style>
